package com.csjbot.coshandler.handle_msg.task;

import com.csjbot.coshandler.core.Robot;
import com.csjbot.coshandler.global.RSPConstants;

/**
 * Created by jingwc on 2017/10/25.
 */

public class RbRobotState extends RbBase {
    @Override
    protected void handleNTFMessage(String dataSource, String msgId) {

    }

    @Override
    protected void handleRSPMessage(String dataSource, String msgId) {
        switch (msgId){
            case RSPConstants.ROBOT_GET_BATTERY_RSP:
                int battery = getIntSingleField(dataSource,"battery");
                Robot.getInstance().pushRobotState(battery);
                break;
        }
    }
}
